-
Notifications
You must be signed in to change notification settings - Fork 5.4k
[Docs] Add Connect API endpoint for updating a deployed trigger #16493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
""" WalkthroughA new section has been added to the API documentation describing an endpoint for updating a deployed trigger for a specific user. The endpoint uses the HTTP PUT method at Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant API Server
Client->>API Server: PUT /deployed-triggers/{deployed_trigger_id} (with external_user_id, body)
API Server-->>Client: Returns updated deployed trigger details
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (5)
docs-v2/pages/connect/api.mdx (5)
2712-2719
: Ensure consistent endpoint path formatting
The newPUT /deployed-triggers/{deployed_trigger_id}
text block is missing the trailing slash present in other endpoint definitions (e.g.,DELETE /deployed-triggers/{deployed_trigger_id}/
). Add a slash to maintain consistency across the docs.
2733-2745
: Indicate required body fields
All three body parameters (active
,configured_props
, andname
) are optional, but at least one must be provided for the update to have any effect. Consider adding a note to clarify that the request body must contain at least one of these fields.
2751-2792
: Usetype
imports for type-only entities
In the TypeScript snippet,GetTriggerResponse
andV1DeployedComponent
are imported as runtime bindings. Switching them totype
imports will prevent unnecessary code from being bundled:-import { - createBackendClient, - GetTriggerResponse, - V1DeployedComponent, - type BackendClient, - type BackendClientOpts, - type UpdateTriggerOpts, -} from "@pipedream/sdk/server"; +import { createBackendClient } from "@pipedream/sdk/server"; +import type { + GetTriggerResponse, + V1DeployedComponent, + BackendClient, + BackendClientOpts, + UpdateTriggerOpts, +} from "@pipedream/sdk/server";
2795-2827
: Clarify JS example variable naming
In the JavaScript snippet,requestOpts
is used without explicit context. Renaming it toupdateOpts
(or similar) will make the intent clearer and mirror the TS example:-// Update the deployed trigger for the specified user -const requestOpts = { +// Prepare options to update the deployed trigger +const updateOpts = { id: "dc_gzumK2e", externalUserId: "jverce", active: true, name: "My Updated Trigger", configuredProps: { gitlab: { authProvisionId: "apn_kVh9AoD", }, projectId: 45672542, }, -}; -const { data: deployedTrigger } = await pd.updateTrigger(requestOpts); +}; +const { data: deployedTrigger } = await pd.updateTrigger(updateOpts);
2830-2853
: Synchronize endpoint path in cURL and description
The cURL example callsPUT https://api.pipedream.com/v1/connect/{project_id}/deployed-triggers/{deployed_trigger_id}/
but the earlier description block omits the trailing slash. Align both examples to avoid confusion.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (1)
docs-v2/pages/connect/api.mdx
(1 hunks)
🔇 Additional comments (1)
docs-v2/pages/connect/api.mdx (1)
2747-2754
: Examples section looks good
The##### Examples
heading and<Tabs>
wrapper are consistent with the rest of the API reference. No changes needed here.
add example response for update trigger
revert newline removal
WHY
The API now supports updating a deployed trigger's configured props.
Summary by CodeRabbit